export const rules = {
  name: [
    {
      required: true,
      message: '用户名是必填的~',
      trigger: 'blur' // input输入内容什么时候验证,blur:失去焦点时;change: 输入时
    },
    {
      pattern: /^[a-z0-9]{5,10}$/,
      message: '用户名必须是5至10位字母或数字~',
      trigger: 'blur'
    }
  ],
  password: [
    {
      required: true,
      message: '密码是必填的~',
      trigger: 'blur'
    },
    {
      pattern: /^[a-z0-9]{6,11}$/,
      message: '密码必须是6至11位字母或数字~',
      trigger: 'blur'
    }
  ]
}
